﻿package Message.BroadCast
{
    import Framework.MQ.*;
    import Framework.Serialize.*;
    import Message.Public.*;

    public class SDropEntityInfo extends IMessageBase
    {
        public var entityId:SEntityId;
        public var ownerEntityId:SEntityId;
        public var fromEntityId:SEntityId;
        public var playerItems:Array;
        public var point:SPoint;
        public var unit:int;
        public var cost:int;
        public var bossCode:int;
        public var mapId:int;
        public var dropDt:Date;
        public const _type:int = 11009;
        public static var _regist:SDropEntityInfo = new SDropEntityInfo(true);

        public function SDropEntityInfo(param1:Boolean = false)
        {
            if (param1)
            {
                MessageManager.instance().regist(this);
            }
            return;
        }// end function

        override public function getType() : int
        {
            return this._type;
        }// end function

        override public function clone() : IMessageBase
        {
            return new SDropEntityInfo();
        }// end function

        override public function __write(param1:SerializeStream) : void
        {
            this.entityId.__write(param1);
            this.ownerEntityId.__write(param1);
            this.fromEntityId.__write(param1);
            SeqPlayerItemHelper.write(param1, this.playerItems);
            this.point.__write(param1);
            param1.writeInt(this.unit);
            param1.writeInt(this.cost);
            param1.writeInt(this.bossCode);
            param1.writeInt(this.mapId);
            param1.writeDate(this.dropDt);
            return;
        }// end function

        override public function __read(param1:SerializeStream) : void
        {
            this.entityId = new SEntityId();
            this.entityId.__read(param1);
            this.ownerEntityId = new SEntityId();
            this.ownerEntityId.__read(param1);
            this.fromEntityId = new SEntityId();
            this.fromEntityId.__read(param1);
            this.playerItems = SeqPlayerItemHelper.read(param1);
            this.point = new SPoint();
            this.point.__read(param1);
            this.unit = param1.readInt();
            this.cost = param1.readInt();
            this.bossCode = param1.readInt();
            this.mapId = param1.readInt();
            this.dropDt = param1.readDate();
            return;
        }// end function

    }
}
